<include file="public@header" />
</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a href="{:url('order/index')}">订单列表</a></li>
		</ul>
        <form class="well form-inline margin-top-20" method="get" action="{:url('order/index')}">
            门店:
            <select class="form-control" name="store_id">
            	<option value=""></option>
            	<foreach name="store_list" item="vo">
            		<option value="{$vo.id}" <if $vo.id == input('store_id')>selected</if> >{$vo.name}</option>
            	</foreach>
            </select>
            订单号:
            <input type="text" class="form-control" name="order_no" style="width: 220px;" value="{:input('request.order_no/s','')}">
            支付方式:
            <select class="form-control" name="pay_type">
            	<option value=""></option>
            	<option value="1" <if 1 == input('pay_type') && input('pay_type') != ''>selected</if> >余额</option>
            	<option value="2" <if 2 == input('pay_type') && input('pay_type') != ''>selected</if> >积分</option>
            </select>
            状态:
            <select class="form-control" name="status">
            	<option value=""></option>
            	<option value="-1" <if -1 == input('status') && input('status') != ''>selected</if> >已取消</option>
            	<option value="0" <if 0 == input('status') && input('status') != ''>selected</if> >待支付</option>
            	<option value="1" <if 1 == input('status') && input('status') != ''>selected</if> >待核销</option>
            	<option value="2" <if 2 == input('status') && input('status') != ''>selected</if> >已完成</option>
            	<option value="3" <if 3 == input('status') && input('status') != ''>selected</if> >已退单</option>
            </select>
            <input type="submit" class="btn btn-primary" value="搜索" />
            <a class="btn btn-danger" href="{:url('order/index')}">清空</a>
        </form>
		<table class="table table-hover table-bordered">
			<thead>
				<tr>
					<th width="50">ID</th>
					<th>订单号</th>
					<th width="200">产品名称</th>
					<th>归属门店</th>
					<th>用户</th>
					<th>价格</th>
					<th>支付方式</th>
					<th>下单时间</th>
					<th>支付时间</th>
					<th>退单时间</th>
					<th>核销时间</th>
					<th>状态</th>
					<th width="180">分佣情况</th>
				</tr>
			</thead>
			<tbody>
				<foreach name="list" item="vo">
				<tr>
					<td>{$vo.id}</td>
					<td>{$vo.order_no}</td>
					<td>{$vo.project.title}</td>
					<td>{$vo.store.name}</td>
					<td>{$vo.user.mobile}</td>
					<td>{$vo.price}</td>
					<td>{$vo.pay_type_text}</td>
					<td>{$vo.create_time}</td>
					<td>{$vo.pay_time}</td>
					<td>{$vo.refund_time}</td>
					<td>{$vo.finish_time}</td>
					<td>{$vo.status_text}</td>
					<td>
						积分（每期）：{$vo.av_score}<br>
						推广金：{$vo.recommender_coin}<br>
						推广积分：{$vo.recommender_score}<br>
						门店收入：{$vo.store_award}<br>
						业务员收入：{$vo.business_award}<br>
						平台收入：{$vo.platform_award}
					</td>
				</tr>
				</foreach>
			</tbody>
		</table>
		<div class="pagination">{$page}</div>
	</div>
	<script src="__STATIC__/js/admin.js"></script>
</body>
</html>